<?$fecha = date("d")."-".date("m")."-".date("Y");
$documento = $_POST['documento'];


include ("../conectarse.php");
$consulta = "select * from mutuales where mut_cuit like $documento";
$resultado = mysql_query($consulta);
$fila = mysql_fetch_array($resultado);
$idmutual = $fila['mut_id'];
$cantidadafiliados = $fila['mut_af'];
?>
<body bgcolor = "#005F8C" alink = "white" vlink = "white" link = "white" text = "white">
<table width  ="100%" height = "100%" cellpadding = "0" cellspacing = "0">

<tr valign = "top">

<td align = "center">

<!--BARRA                    -->

<?include ("./barra/barramutual.php");?>

<!-- FIN DE LA BARRA                    -->
</td>


</tr>


<tr valign = "top" height = "100%"><td align = "left">

<!-- CUERPO DEL SISTEMA -->
<table cellpadding = "0" cellspacing = "0" border  ="0" height = "100%">
<tr valign = "middle"><td bgcolor = "black">


<?include ("links.php");?>



<!-- FIN DEL CUERPO DEL SISTEMA -->







</td><td width = "100%" align = "center">












<?include ("../conectarse.php");

$consulta = "select * from prestamos where pres_id_mutual like '$idmutual'";
$resultado = mysql_query($consulta);
$cantidad = mysql_num_rows($resultado);
$cantidadmesactual = $cantidad;

$ttl1 = $cantidadafiliados-$cantidadmesactual;

$calculo = ($ttl1*100)/$cantidadafiliados;
$calculo = $calculo/10;
$calculo = substr($calculo,0,strpos($calculo,"."));




?>











<table cellpadding="0" cellspacing="0" border="1"><TR><TD colspan="3">








<CENTER>PROYECCION ACTUAL<HR><HR>
<TABLE cellpadding="0" cellspacing="0" border="1"><TR height = "40"><D WIDTH = "600">



<table height = "100%" width="100%" border="1" cellpadding="0" cellspacing="0"><TR height = "100%">

<?for($i=0;$i<$calculo;$i++){?>
<TD bgcolor="green" width="50">&nbsp;</TD><?}?>

<?for($i=0;$i<(10-$calculo);$i++){?>
<TD bgcolor="red" width="50">&nbsp;</TD><?}?>

</TR></table>


</TD></TR>







<tr>


<TD>
<table><TR><TD>

<CENTER>MES SIGUIENTE<HR><HR>
<TABLE cellpadding="0" cellspacing="0" border="1"><TR height = "40"><tD WIDTH = "250">



<table height = "100%" width="100%" border="1" cellpadding="0" cellspacing="0"><TR height = "100%">

<?for($i=0;$i<$calculo;$i++){?>
<TD bgcolor="green" width="50">&nbsp;</TD><?}?>

<?for($i=0;$i<(10-$calculo);$i++){?>
<TD bgcolor="red" width="50">&nbsp;</TD><?}?>

</TR></table>


</TD></TR></TABLE></CENTER>


</TD>







<br><td>

<TD>


<CENTER>DENTRO DE DOS MESES<HR><HR>
<TABLE cellpadding="0" cellspacing="0" border="1"><TR height = "40"><tD WIDTH = "250">



<table height = "100%" width="100%" border="1" cellpadding="0" cellspacing="0"><TR height = "100%">

<?for($i=0;$i<$calculo;$i++){?>
<TD bgcolor="green" width="50">&nbsp;</TD><?}?>

<?for($i=0;$i<(10-($calculo));$i++){?>
<TD bgcolor="red" width="50">&nbsp;</TD><?}?>

</TR></table>


</TD></TR></TABLE></CENTER>


</TD>

</td>



<td>

<TD>


<CENTER>DENTRO DE TRES MESES<HR><HR>
<TABLE cellpadding="0" cellspacing="0" border="1"><TR height = "40"><tD WIDTH = "250">



<table height = "100%" width="100%" border="1" cellpadding="0" cellspacing="0"><TR height = "100%">

<?for($i=0;$i<$calculo+3;$i++){?>
<TD bgcolor="green" width="50">&nbsp;</TD><?}?>

<?for($i=0;$i<(10-($calculo));$i++){?>
<TD bgcolor="red" width="50">&nbsp;</TD><?}?>

</TR></table>


</TD></TR></TABLE></CENTER>


</TD>

</td>










</TABLE></CENTER>



























</TD></TR>






<tr><TD>

</TD>






















</table>































</td>
</td></tr>

</table>
